Applied patch from Thomas Leonard to make stepper click to scroll take
authorOwen Taylor <otaylor@redhat.com>
Sat, 23 Feb 2002 14:46:21 +0000 (14:46 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sat, 23 Feb 2002 14:46:21 +0000 (14:46 +0000)
Fri Feb 22 20:28:18 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkrange.c: Applied patch from Thomas Leonard to make
        stepper click to scroll take effect immediately, rather than after
        a delay (#67649).

        * gtk/gtkrange.c: Remove right-click == step in trough since it
        isn't a useful binding and it's a large area to hit accidentally.
        (Leave it on the steppers since its more useful there and less
        likely to do accidentally.)

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkrange.c

index f710c1fadd804ed2c67acb124a00a3d1e2d8fd16..f2a8eb0e748620a65321757573c3130413dfbd63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Fri Feb 22 20:28:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c: Applied patch from Thomas Leonard to make
+       stepper click to scroll take effect immediately, rather than after
+       a delay (#67649).
+
+       * gtk/gtkrange.c: Remove right-click == step in trough since it
+       isn't a useful binding and it's a large area to hit accidentally.
+       (Leave it on the steppers since its more useful there and less
+       likely to do accidentally.)
+
 2002-02-23  Pablo Saratxaga  <pablo@mandrakesoft.com>
 
        * configure.in (ALL_LINGUAS): Add "cy" to the language list.
index f710c1fadd804ed2c67acb124a00a3d1e2d8fd16..f2a8eb0e748620a65321757573c3130413dfbd63 100644 (file)
@@ -1,3 +1,14 @@
+Fri Feb 22 20:28:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c: Applied patch from Thomas Leonard to make
+       stepper click to scroll take effect immediately, rather than after
+       a delay (#67649).
+
+       * gtk/gtkrange.c: Remove right-click == step in trough since it
+       isn't a useful binding and it's a large area to hit accidentally.
+       (Leave it on the steppers since its more useful there and less
+       likely to do accidentally.)
+
 2002-02-23  Pablo Saratxaga  <pablo@mandrakesoft.com>
 
        * configure.in (ALL_LINGUAS): Add "cy" to the language list.
index f710c1fadd804ed2c67acb124a00a3d1e2d8fd16..f2a8eb0e748620a65321757573c3130413dfbd63 100644 (file)
@@ -1,3 +1,14 @@
+Fri Feb 22 20:28:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c: Applied patch from Thomas Leonard to make
+       stepper click to scroll take effect immediately, rather than after
+       a delay (#67649).
+
+       * gtk/gtkrange.c: Remove right-click == step in trough since it
+       isn't a useful binding and it's a large area to hit accidentally.
+       (Leave it on the steppers since its more useful there and less
+       likely to do accidentally.)
+
 2002-02-23  Pablo Saratxaga  <pablo@mandrakesoft.com>
 
        * configure.in (ALL_LINGUAS): Add "cy" to the language list.
index f710c1fadd804ed2c67acb124a00a3d1e2d8fd16..f2a8eb0e748620a65321757573c3130413dfbd63 100644 (file)
@@ -1,3 +1,14 @@
+Fri Feb 22 20:28:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c: Applied patch from Thomas Leonard to make
+       stepper click to scroll take effect immediately, rather than after
+       a delay (#67649).
+
+       * gtk/gtkrange.c: Remove right-click == step in trough since it
+       isn't a useful binding and it's a large area to hit accidentally.
+       (Leave it on the steppers since its more useful there and less
+       likely to do accidentally.)
+
 2002-02-23  Pablo Saratxaga  <pablo@mandrakesoft.com>
 
        * configure.in (ALL_LINGUAS): Add "cy" to the language list.
index f710c1fadd804ed2c67acb124a00a3d1e2d8fd16..f2a8eb0e748620a65321757573c3130413dfbd63 100644 (file)
@@ -1,3 +1,14 @@
+Fri Feb 22 20:28:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c: Applied patch from Thomas Leonard to make
+       stepper click to scroll take effect immediately, rather than after
+       a delay (#67649).
+
+       * gtk/gtkrange.c: Remove right-click == step in trough since it
+       isn't a useful binding and it's a large area to hit accidentally.
+       (Leave it on the steppers since its more useful there and less
+       likely to do accidentally.)
+
 2002-02-23  Pablo Saratxaga  <pablo@mandrakesoft.com>
 
        * configure.in (ALL_LINGUAS): Add "cy" to the language list.
index f710c1fadd804ed2c67acb124a00a3d1e2d8fd16..f2a8eb0e748620a65321757573c3130413dfbd63 100644 (file)
@@ -1,3 +1,14 @@
+Fri Feb 22 20:28:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c: Applied patch from Thomas Leonard to make
+       stepper click to scroll take effect immediately, rather than after
+       a delay (#67649).
+
+       * gtk/gtkrange.c: Remove right-click == step in trough since it
+       isn't a useful binding and it's a large area to hit accidentally.
+       (Leave it on the steppers since its more useful there and less
+       likely to do accidentally.)
+
 2002-02-23  Pablo Saratxaga  <pablo@mandrakesoft.com>
 
        * configure.in (ALL_LINGUAS): Add "cy" to the language list.
index f710c1fadd804ed2c67acb124a00a3d1e2d8fd16..f2a8eb0e748620a65321757573c3130413dfbd63 100644 (file)
@@ -1,3 +1,14 @@
+Fri Feb 22 20:28:18 2002  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c: Applied patch from Thomas Leonard to make
+       stepper click to scroll take effect immediately, rather than after
+       a delay (#67649).
+
+       * gtk/gtkrange.c: Remove right-click == step in trough since it
+       isn't a useful binding and it's a large area to hit accidentally.
+       (Leave it on the steppers since its more useful there and less
+       likely to do accidentally.)
+
 2002-02-23  Pablo Saratxaga  <pablo@mandrakesoft.com>
 
        * configure.in (ALL_LINGUAS): Add "cy" to the language list.
index de04272f5a417e87cf9405bc8c16145d40602ebe..2007fae409961c04f9cd67e02941ef5aa9596234 100644 (file)
@@ -1040,22 +1040,16 @@ range_get_scroll_for_grab (GtkRange      *range)
         case 3:
           return GTK_SCROLL_END;
           break;
-        }
+       }
       break;
 
       /* In the trough */
     case MOUSE_TROUGH:
       {
         if (range->trough_click_forward)
-          {
-            return range->layout->grab_button == 3
-              ? GTK_SCROLL_STEP_FORWARD : GTK_SCROLL_PAGE_FORWARD;
-          }
+         return GTK_SCROLL_PAGE_FORWARD;
         else
-          {
-            return range->layout->grab_button == 3
-              ? GTK_SCROLL_STEP_BACKWARD : GTK_SCROLL_PAGE_BACKWARD;
-          }
+         return GTK_SCROLL_PAGE_BACKWARD;
       }
       break;
 
@@ -1116,10 +1110,9 @@ gtk_range_button_press (GtkWidget      *widget,
     gtk_widget_queue_draw (widget);
     
   if (range->layout->mouse_location == MOUSE_TROUGH  &&
-      (event->button == 1 || event->button == 3))
+      event->button == 1)
     {
-      /* button 1 steps by step increment, as with button 1 on a stepper,
-       * button 3 steps by page increment, as with button 2 on a stepper
+      /* button 1 steps by page increment, as with button 2 on a stepper
        */
       GtkScrollType scroll;
       gdouble click_value;
@@ -1256,25 +1249,13 @@ gtk_range_button_release (GtkWidget      *widget,
   
   if (range->layout->grab_button == event->button)
     {
-      GtkScrollType scroll;
       MouseLocation grab_location;
 
       grab_location = range->layout->grab_location;
 
-      scroll = range_get_scroll_for_grab (range);
-      
       range_grab_remove (range);
       gtk_range_remove_step_timer (range);
       
-      /* We only do the move if we're still on top of the button at
-       * release
-       */
-      if (grab_location == range->layout->mouse_location &&
-          scroll != GTK_SCROLL_NONE)
-        {
-          gtk_range_scroll (range, scroll);
-        }
-
       if (grab_location == MOUSE_SLIDER)
         update_slider_position (range, event->x, event->y);
 
@@ -2265,6 +2246,8 @@ gtk_range_add_step_timer (GtkRange      *range,
                    initial_timeout,
                    range);
   range->timer->step = step;
+
+  gtk_range_scroll (range, range->timer->step);
 }
 
 static void